<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name='viewport' content='width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0'>
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>移动端搜索列表practice01</title>
  <link rel="icon" href="./favicon.ico">
  <link rel="stylesheet" href="./lib/fa/css/font-awesome.css">
  <link rel="stylesheet" href="./lib/mui/css/mui.css">
  <link rel="stylesheet" href="./css/common.css">
  <link rel="stylesheet" href="./css/searchList.css">
</head>
<body>
  <div class="lt_container">
    <div class="lt_header">
      <a class="icon_left mui-icon mui-icon-arrowleft" href="javascript:history.back();"></a>
      <span>商品列表</span>
    </div>
    <div class="lt_main">
      <!-- 区域滚动 -->
      <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
          <!--这里放置真实显示的DOM内容-->
          <div class="lt_search">
              <input type="text" placeholder="">
              <button class="btn-search mui-btn mui-btn-primary">搜索</button>
          </div>
          <div class="lt_sort">
            <a href="javascript:;">上架时间<span class="fa fa-angle-down"></span></a>
            <a data-type="price" href="javascript:;">价格<span class="fa fa-angle-down"></span></a>
            <a data-type="num" href="javascript:;">库存<span class="fa fa-angle-down"></span></a>
            <a href="javascript:;">折扣<span class="fa fa-angle-down"></span></a>
          </div>

          <div class="lt_product mui-clearfix">
            
            <!-- 等待渲染 -->
              <!-- <a class="lt_item" href="#">
                  <img src="./images/product.jpg" alt="">
                  <p class="mui-ellipsis-2">阿迪达斯阿迪达斯阿迪达斯阿迪达斯阿迪达斯阿迪达斯阿迪达斯阿迪达斯阿迪达斯阿迪达斯阿迪达斯阿迪达斯</p>
                  <p>
                      <span class="price">¥560</span>
                      <span class="oldPrice">¥580</span>
                  </p>
                  <button class="mui-btn mui-btn-primary">立即购买</button>
              </a> -->
          </div>

        </div>
      </div>
    </div>
    <div class="lt_footer">
      <ul>
        <li><a href="index.html"><span class="fa fa-home"></span><p>首页</p></a></li>
        <li><a href="category.html"><span class="fa fa-home"></span><p>分类</p></a></li>
        <li><a href="cart.html"><span class="fa fa-shopping-cart"></span><p>购物车</p></a></li>
        <li><a href="user.html"><span class="fa fa-user"></span><p>会员中心</p></a></li>
      </ul>
    </div>
  </div>

  <script type="text/template" id="tmp">
  {{if data.length===0}}
  <p>抱歉,没有对应的商品信息</p>
  {{/if}}
  {{each data v i}}
     <a class="lt_item" href="product.html?id={{v.id}}">
       <img src="{{v.pic[0].picAddr}}" alt="">
       <p class="mui-ellipsis-2">{{v.num}}-------{{v.proName}}</p>
       <p>
           <span class="price">{{v.price}}</span>
           <span class="oldPrice">{{v.oldPrice}}</span>
       </p>
           <button class="mui-btn mui-btn-primary">立即购买</button>
    </a>
  {{/each}}
  </script>

  
  <script src="./lib/zepto/zepto.min.js"></script>
  <script src="./lib/mui/js/mui.js"></script>
  <script src="./lib/artTemplate/template-web.js"></script>
  <script src="./js/common.js"></script>
  <script src="./js/searchList.js"></script>
</body>
</html>